<?php

function getActiveLeagues() {
	$sql = "select id from league where active = 1;";

	$result = mysql_query($sql);
	
	$array = array();
	while($row = mysql_fetch_array($result)) {
 	   $array[] = $row['id'];
	}
	
	return $array;
}

?>